﻿@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.PUB;
@using Apps.Web;
@using Apps.Locale;
@using Apps.Models.Sys;
@using Apps.Models.Enum;
@{
    ViewBag.Title = "入厂关联自采";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
    string dataIds = ViewBag.dataIds as string;
}
<div class="mvctool bgb">
    @Html.ToolButton("btnSave", "fa fa-save", "确认结算", "Save", true)
    @Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply, false)
</div>
<script type="text/javascript">
    $(function () {
        $("#btnSave").click(function () {
            
            //var ExamineRemark = $("#ExamineRemark").val();
            var chExamine = $('input:radio:checked').val();
            //if (chExamine == -1)
            //{
            //    if (ExamineRemark == "") {
            //        $.messageBox5s(Lang.Tip, '请填写审核不通过的说明');
            //        return;
            //    }
            //}
            if ($("form").valid()) {
                $.ajax({
                    url: "@Url.Action("JieSuanData")",
                    type: "Post",
                    data: $("form").serialize(),
                    dataType: "json",
                    success: function (data) {
                        if (data.type == 1) {
                            window.parent.frameReturnByMes(data.message);
                            window.parent.frameReturnByReload(true);
                            window.parent.frameReturnByClose()
                        }
                        else {
                            window.parent.frameReturnByMes(data.message);
                        }
                    }
                });
            }
            return false;
        });
        $("#btnReturn").click(function () {
            window.parent.frameReturnByClose();
        });
    });
</script>
@using (Html.BeginForm())
{
    <input type="hidden" id="dataIds" name="dataIds" value="@dataIds" />
    <table class="formtable">
        <tbody>
            <tr>
                <th>
                    批次码：
                </th>
                <td>
                    @dataIds
                </td>
            </tr>
        </tbody>
    </table>
    @Html.ValidationSummary()
}

